/*
 * @Description: 分类目录相关接口
 * @Version: 1.0
 * @Autor: chen_yt
 * @Date: 2020-09-14 14:48:53
 * @LastEditors: chen_yt
 * @LastEditTime: 2020-11-05 16:13:54
 */
import request from '@/utils/request'


//根据分类目录ID删除
export function delCategoryById(id) {
  return request({
    method: 'DELETE',
    url: '/mutual-content/category',
    params: {
      id
    }
  })
}

export function addCategory(data, type) {
  return request({
    method: type == 'new' ? 'POST' : 'PUT',
    url: '/mutual-content/category',
    data
  })
}

export function updateCategory(data) {
  return request({
    method: 'PUT',
    url: '/mutual-content/category',
    data
  })
}

